using System.Collections.Generic;
using UnityEngine;

public class RacketShop : UILayer
{
	public List<GameObject> background = new List<GameObject>();

	public GameObject racketShopEnv;

	public Transform envirnonment;

	public float rotSpeed = 40f;

	protected float rotTime;

	private void OnEnable()
	{
		foreach (GameObject item in background)
		{
			item.SetActive(false);
		}
		racketShopEnv.SetActive(true);
		Ads.instance.hideBanner(true);
	}

	private void OnDisable()
	{
		foreach (GameObject item in background)
		{
			item.SetActive(true);
		}
		racketShopEnv.SetActive(false);
		Ads.instance.hideBanner(false);
	}

	private new void Update()
	{
		rotTime += Time.deltaTime;
		envirnonment.rotation = Quaternion.AngleAxis(rotTime * rotSpeed, Vector3.up);
	}
}
